<?php

use App\Http\Controllers\Test\TestController;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\Live\LiveRecordController;
use App\Http\Controllers\OSS\OSSController;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::any("helloWorld", function (Request $request) {
    return json_encode([
        "status" => 200,
        "data" => "Hello world",
        "message" => "꒰ᐢ⸝⸝•༝•⸝⸝ᐢ꒱"
    ]);
});
Route::any("test/workerman", [TestController::class, "testWorkerman"]);
Route::any("live/record/change", [LiveRecordController::class, "LiveStatusChange"]);

Route::any("oss/upload/end", [OSSController::class, "uploadEnd"]);
Route::any("oss/upload/start", [OSSController::class, "uploadFile"]);

Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
    return $request->user();
});
